<%-- 
    Document   : header.jsp
    Created on : Jun 9, 2011, 9:58:57 PM
    Author     : pdaitoan
--%>

<%@page import="Entity.Account"%>
<%@page import="DataAccess.UserAccess"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="content-type" content="text/html; charset=UTF-8">

        <link type="text/css" rel="stylesheet" href="css/main.css">
        <link type="text/css" rel="stylesheet" href="css/menu.css">
        <link type="text/css" rel="stylesheet" href="menu/menu_style.css">
            <!--[if lt IE 7]>
                    <link rel="stylesheet" type="text/css" href="/menu/includes/ie6.css" media="screen"/>
            <![endif]-->
        <style type="text/css">
            .ui-widget{font-size:0.7em;}
            .ui-helper-hidden-accessible{clip:auto;}
        </style>
        <title> </title>
    </head>
    <body>
        <div id="wrappermain">
   	<div id="header">
            <div id="topnav">
                    <ul id="topmenu">
                        <%
                            // Check Permission()
                            UserAccess user = new UserAccess();
                            Account account = new Account();
                            if(null != session.getAttribute("uid"))
                            {
                                Long id = (Long)session.getAttribute("uid");
                                
                                account = user.getUserByID(id);
                            }
                            else
                                response.sendRedirect("Login.jsp");
                            
                        %>
                        <li><a>Người sử dụng: <% out.print(account.getUsername()); %></a></li>
                        <li><a href="../Account/ChangePassword.jsp?id=<% out.print(account.getId()); %>">Đổi mật khẩu</a></li>
                            <li><a href="../SignOut.jsp">Thoát</a></li>
                    </ul>
            </div> <!-- end #topnav -->

            <div id="container">
                <div id="header">
                </div>
            </div>
   	</div><!-- end #header -->
        </div>
        <div class="nav-container-outer">
           <img src="../menu/images/nav-bg-l.jpg" alt="" class="float-left" />
           <img src="../menu/images/nav-bg-r.jpg" alt="" class="float-right" />
           <ul id="nav-container" class="nav-container">
               <li><a class="item-primary" href="../TrangChu.jsp" target="_self">Trang chủ</a>
               </li>
               <li><a class="item-primary" href="/VanBanDen/DisplayIDoc.jsp" target="_self">Văn bản đến</a>
                 <ul style="width:150px;">
                     <li><a href="/VanBanDen/DisplayIDoc.jsp" title="Danh sach VB den" target="_self" >Danh sách VB đến</a></li>
                     <li><a href="/VanBanDen/AddIdoc.jsp" title="Nhap moi VB den" target="_self" >Nhập mới VB đến</a></li>
                     <li><a href="/VanBanDen/ThongKeVBDen.jsp" title="Thong ke VB den" target="_self" >Thống kê VB đến</a></li>
                 </ul>
                   </li>
               <li><span class="divider divider-vert" ></span></li>
               <li><a class="item-primary" href="/VanBanDi/DisplayODoc.jsp" target="_self">Văn bản đi</a>
                 <ul style="width:150px;">
                     <li><a href="/VanBanDi/DisplayODoc.jsp" title="Danh sach VB di" target="_self" >Danh sách VB đi</a></li>
                     <li><a href="/VanBanDi/CreateODoc.jsp" title="Soan thao VB di" target="_self" >Soạn thảo VB đi</a></li>
                     <li><a href="/VanBanDi/ThongKeVBDi.jsp" title="Thong ke VB di" target="_self" >Thống kê VB đi</a></li>
                 </ul>
                   </li>
               <li><span class="divider divider-vert" ></span></li>
              <li><a class="item-primary" href="/VanBanNoiBo/DisplayBDoc.jsp" target="_self">Văn bản nội bộ</a>
                 <ul style="width:150px;">
                    <li><a href="/VanBanNoiBo/DisplayBDoc.jsp" title="Danh sach VB noi bo" target="_self" >Danh sách VB nội bộ</a></li>
                    <li><a href="/VanBanNoiBo/CreateBDoc.jsp" title="Soan VB noi bo" target="_self" >Soạn VB nội bộ</a></li>
                    <li><a href="/VanBanNoiBo/ThongKeVBNoiBo.jsp" title="Thong keVB noi bo" target="_self" >Thống kê VB nội bộ</a></li>
                 </ul>
              </li>
              <%
                    if(account.getRole().trim().equals("admin"))
                    {
              %>
              <li><a class="item-primary" href="/Account/DisplayAccount.jsp" target="_self">Quản trị</a>
                  <ul style="width:150px;">
                      <li><a href="/Account/CreateAccount.jsp" title="Tao moi User" target="_self" >Tạo mới User</a></li>
                      <li><a href="/Account/DisplayAccount.jsp" title="Danh sach User " target="_self" >Danh sách User</a></li>
                      <li><a href="/QuanLyBieuMau.jsp" title="Quản lý biểu mẫu " target="_self" >Quản lý biểu mẫu</a></li>
                 </ul>
               </li>
               <li><span class="divider divider-vert" ></span></li>
              <li class="clear">&nbsp;</li>
              <%
                    }
              %>
           </ul>
        </div>
    </body>
</html>
